package com.tansun.easycare.rule.executionblock.entity;

public class BPMNEdge {
	
	private int x1;
	private int y1;
	private int x2;
	private int y2;
	private String id;
	
	public BPMNEdge() {
		super();
	}

	public BPMNEdge(int x1, int y1, int x2, int y2, String id) {
		super();
		this.x1 = x1;
		this.y1 = y1;
		this.x2 = x2;
		this.y2 = y2;
		this.id = id;
	}

	public int getX1() {
		return x1;
	}

	public void setX1(int x1) {
		this.x1 = x1;
	}

	public int getY1() {
		return y1;
	}

	public void setY1(int y1) {
		this.y1 = y1;
	}

	public int getX2() {
		return x2;
	}

	public void setX2(int x2) {
		this.x2 = x2;
	}

	public int getY2() {
		return y2;
	}

	public void setY2(int y2) {
		this.y2 = y2;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String toString(String space) {
    	StringBuffer sb = new StringBuffer();
    	if(space==null)space="";
        sb.append(space + "<bpmndi:BPMNEdge bpmnElement=\""+id+"\">\n"); 
		sb.append(space + "    <di:waypoint x=\""+x1+"\" y=\""+y1+"\"/>\n");
		sb.append(space + "    <di:waypoint x=\""+x2+"\" y=\""+y2+"\"/>\n");
		sb.append(space + "</bpmndi:BPMNEdge>\n");
		return sb.toString();
	}

}
